package com.fable.ntzw_ga.entity;

import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "dept")
@Accessors(chain = true)
public class Dept implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @TableId(type = IdType.AUTO)
    @Column(name = "id", columnDefinition = "bigint(0) AUTO_INCREMENT COMMENT '部门id'")
    private Long id;
    /**
     * 部门
     */
    @Column(name = "name", columnDefinition = "varchar(36) COMMENT '部门'")
    private String name;

    /**
     * 编号
     */
    @Column(name = "seq", columnDefinition = "varchar(36) COMMENT '编号'")
    private String seq;

    @Column(name = "gmt_create", columnDefinition = "datetime(0) COMMENT '创建时间'")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtCreate;

    @Column(name = "gmt_modified", columnDefinition = "datetime(0) COMMENT '修改时间'")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private LocalDateTime gmtModified;
}
